package com.turing.post.report.util;

import java.util.Date;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;

/**
 * 日结业务逻辑接口
 * 
 * @author yxb
 * 
 */
@Remote
@Local
public interface DaySettlementBusiness {
	/**
	 * 产生某发卡商某日某发卡商分支机构下属销售机构的机构卡种类日结数据
	 * 
	 * @param issueCompanyNo
	 *            发卡商NO
	 * @param tranDate
	 *            帐务日期
	 * @param issueBranchNo
	 *            发卡商分支机构
	 * @throws PCPSApplicationException
	 */
	public void generateAccSysBranchCardDaySettlement(String issueCompanyNo,
			Date tranDate, String issueBranchNo)
			throws PCPSApplicationException;

	/**
	 * 产生某发卡商某日卡种类日结数据
	 * 
	 * @param issueCompanyNo
	 *            发卡商NO
	 * @param tranDate
	 *            帐务日期
	 * @throws PCPSApplicationException
	 */
	public void generateAccSysCardDaySettlement(String issueCompanyNo,
			Date tranDate) throws PCPSApplicationException;

	/**
	 * 产生某发卡商某日某发卡商分支机构下属销售机构的日结数据
	 * 
	 * @param issueCompanyNo
	 *            发卡商NO
	 * @param tranDate
	 *            帐务日期
	 * @param issueBranchNo
	 *            发卡商分支机构
	 * @throws PCPSApplicationException
	 */
	public void generateAccSysBranchDaySettlement(String issueCompanyNo,
			Date tranDate, String issueBranchNo)
			throws PCPSApplicationException;

	/**
	 * 产生某发卡商某日的日结数据
	 * 
	 * @param issueCompanyNo
	 *            发卡商NO
	 * @param tranDate
	 *            帐务日期
	 * @throws PCPSApplicationException
	 */
	public void generateAccSysDaySettlement(String issueCompanyNo, Date tranDate)
			throws PCPSApplicationException;

	/**
	 * 产生某发卡商某日的销售机构资金日结数据
	 * 
	 * @param issueCompanyNo
	 *            发卡商NO
	 * @param tranDate
	 *            帐务日期
	 * @throws PCPSApplicationException
	 */
	public void generateSaleCapitalDaySettlement(String issueCompanyNo,
			Date tranDate) throws PCPSApplicationException;

	/**
	 * 产生某发卡商某日所有分支机构的卡库存日结数据
	 * 
	 * @param issueCompanyNo
	 *            发卡商NO
	 * @param tranDate
	 *            帐务日期
	 * @throws PCPSApplicationException
	 */
	public void generateIssueCardStockDaySettlement(String issueCompanyNo,
			Date tranDate) throws PCPSApplicationException;

	/**
	 * 产生某发卡商某日某发卡商分支机构下辖销售分支机构的卡库存日结数据
	 * 
	 * @param issueCompanyNo
	 *            发卡商NO
	 * @param tranDate
	 *            帐务日期
	 * @param issueBranchNo
	 *            发卡商分支机构
	 * @throws PCPSApplicationException
	 */
	public void generateSaleCardStockDaySettlement(String issueCompanyNo,
			Date tranDate, String issueBranchNo)
			throws PCPSApplicationException;

	/**
	 * 产生某发卡商某日某机构的凭证日结数据
	 * 
	 * @param issueCompanyNo
	 *            发卡商NO
	 * @param tranDate
	 *            帐务日期
	 * @throws PCPSApplicationException
	 */
	public void generateVoucherStockDaySettlement(String issueCompanyNo,
			Date tranDate) throws PCPSApplicationException;

	/**
	 * 产生某发卡商某日按商户的日结数据
	 * 
	 * @param issueCompanyNo
	 *            发卡商NO
	 * @param tranDate
	 *            帐务日期
	 * @throws PCPSApplicationException
	 */
	public void generateMerchantDaySettlement(String issueCompanyNo,
			Date tranDate) throws PCPSApplicationException;

	/**
	 * 产生某发卡商某日按商户及业务类型的日结数据
	 * 
	 * @param issueCompanyNo
	 *            发卡商NO
	 * @param tranDate
	 *            帐务日期
	 * @throws PCPSApplicationException
	 */
	public void generateMerchantBusinessDaySettlement(String issueCompanyNo,
			Date tranDate) throws PCPSApplicationException;

	/**
	 * 产生某发卡商某日某商户的按销售机构日结数据
	 * 
	 * @param issueCompanyNo
	 *            发卡商NO
	 * @param tranDate
	 *            帐务日期
	 * @param merchantNo
	 *            商户号
	 * @throws PCPSApplicationException
	 */
	public void generateIncomeDaySettlementByMerchantNo(String issueCompanyNo,
			Date tranDate, String merchantNo) throws PCPSApplicationException;

	/**
	 * 产生某发卡商某销售机构某日业务日结数据
	 * 
	 * @param issueCompanyNo
	 * @param tranDate
	 * @param saleBranchNo
	 * @param isOfficial
	 * @throws PCPSApplicationException
	 */
	public void generateBranchDaySett(String issueCompanyNo, Date tranDate,
			String saleBranchNo, boolean isOfficial)
			throws PCPSApplicationException;

	/**
	 * 销售机构日终轧帐
	 * 
	 * @param issueCompanyNo
	 * @param tranDate
	 * @param saleBranchNo
	 * @param isOfficial
	 * @throws PCPSApplicationException
	 */
	public void saleBranchDayOffSett(String issueCompanyNo, Date tranDate,
			String saleBranchNo, boolean isOfficial)
			throws PCPSApplicationException;

	/**
	 * 产生某发卡商某发卡机构激活、授信额度账务日结表
	 * 
	 * @param issueCompanyNo
	 * @param tranDate
	 * @throws PCPSApplicationException
	 */
	public void generateCreditDaySettlement(String issueCompanyNo, Date tranDate)
			throws PCPSApplicationException;

	/**
	 * 发卡商日切
	 * 
	 * @param issueCompanyNo
	 *            发卡商NO
	 * @throws PCPSApplicationException
	 */
	public void switchIssueCompany(String issueCompanyNo)
			throws PCPSApplicationException;

	/**
	 * 设置发卡商状态
	 * 
	 * @param issueCompanyNo
	 * @param status
	 * @param dayOffStatus
	 * @param dayOffRemark
	 * @return
	 */
	public boolean switchDayOffStatus(String issueCompanyNo, String status,
			String dayOffStatus, String dayOffRemark);

	/**
	 * 商户日切
	 * 
	 * @param merchantNo
	 *            商户号
	 * @param isForce
	 *            是否强行日切
	 * @throws PCPSApplicationException
	 */
	public void merchantDayOff(String merchantNo, boolean isForce)
			throws PCPSApplicationException;

	/**
	 * 开始日终
	 * 
	 * @param issueCompanyNo
	 */
	public void startDayOff(String issueCompanyNo)
			throws PCPSApplicationException;
}
